package com.str.LLs;
public class SLLNodeTest {
    
  public static void main(String[] arg) {
    SLLNode head, temp;
         
    temp = new SLLNode("dog",
           new SLLNode("cat",
           new SLLNode("rat", null)));
    head = temp;    // head -> dog -> cat -> rat -> null
        
    System.out.print("head");               
    while (temp != null) {
      System.out.print(" -> " + temp);
      temp = temp.next;
    } 
    System.out.println(" -> null");
  }
}
